﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcProject.Models.TemporaryWorkers>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="../javascript/dateselect.js" type="text/javascript"></script>
    <h2>编辑临时工信息</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
           <legend>临时工信息</legend>
            
            <div class="editor-label">
                临时工身份证号
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.WorderCardCode) %>
                <%: Html.ValidationMessageFor(model => model.WorderCardCode) %>
            </div>
            
            <div class="editor-label">
                临时工姓名
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.WorkerName) %>
                <%: Html.ValidationMessageFor(model => model.WorkerName) %>
            </div>
            
            <div class="editor-label">
                临时工状态
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.WorkerStatus, new SelectList(
                        new List<Object> { new { value = "在岗", text = "在岗" }, 
                        new { value = "离职", text = "离职" } }, "value", "text", "在岗"))%>
                <%: Html.ValidationMessageFor(model => model.WorkerStatus) %>
            </div>
            
            <div class="editor-label">
                性别
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.Sex, new SelectList(
                        new List<Object> { new { value = "男", text = "男" }, 
                        new { value = "女", text = "女" } }, "value", "text", "男"))%>
                <%: Html.ValidationMessageFor(model => model.Sex) %>
            </div>
            
            <div class="editor-label">
                上岗证号
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.EmployeeCard) %>
                <%: Html.ValidationMessageFor(model => model.EmployeeCard) %>
            </div>
            
            <div class="editor-label">
                合同开始时间
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ContractStartDate, new { @onclick = "popUpCalendar(this, this, 'yyyy-mm-dd h:m:s');", @readonly = "readonly" })%>
                <%: Html.ValidationMessageFor(model => model.ContractStartDate) %>
            </div>
            
            <div class="editor-label">
                合同结束时间
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ContractEndDate, new { @onclick = "popUpCalendar(this, this, 'yyyy-mm-dd h:m:s');", @readonly = "readonly" })%>
                <%: Html.ValidationMessageFor(model => model.ContractEndDate) %>
            </div>
            
            <div class="editor-label">
                籍贯
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Birthplace) %>
                <%: Html.ValidationMessageFor(model => model.Birthplace) %>
            </div>
            
            <div class="editor-label">
                学历
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.Education, new SelectList(
                        new List<Object> {
                        new { value = "小学", text = "小学" }, 
                        new { value = "初中", text = "初中" }, 
                        new { value = "中专", text = "中专" }, 
                        new { value = "大专", text = "大专" }, 
                        new { value = "本科", text = "本科" }, 
                        new { value = "硕士", text = "硕士" }, 
                        new { value = "博士", text = "博士" } }, "value", "text", "小学"))%>
                <%: Html.ValidationMessageFor(model => model.Education) %>
            </div>
            
            <div class="editor-label">
                工种类型
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.WorkTypeId) %>
                <%: Html.ValidationMessageFor(model => model.WorkTypeId) %>
            </div>
            
            <div class="editor-label">
                工种类型
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.WorkType) %>
                <%: Html.ValidationMessageFor(model => model.WorkType) %>
            </div>
            
            <div class="editor-label">
                工号
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.WorkerNumber) %>
                <%: Html.ValidationMessageFor(model => model.WorkerNumber) %>
            </div>
            
            <div class="editor-label">
                技术职称
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.TechnicalTitle) %>
                <%: Html.ValidationMessageFor(model => model.TechnicalTitle) %>
            </div>
            
            <div class="editor-label">
                担保人
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Guarantor) %>
                <%: Html.ValidationMessageFor(model => model.Guarantor) %>
            </div>
            
            <div class="editor-label">
                家庭联系人
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FamilyContactor) %>
                <%: Html.ValidationMessageFor(model => model.FamilyContactor) %>
            </div>
            
            <div class="editor-label">
                家庭详细住址
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FamilyAddress) %>
                <%: Html.ValidationMessageFor(model => model.FamilyAddress) %>
            </div>
            
            <div class="editor-label">
                家属联系方式
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FamilyContactMethod) %>
                <%: Html.ValidationMessageFor(model => model.FamilyContactMethod) %>
            </div>
            
            <div class="editor-label">
                本人联系方式
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.SelfContactMethod) %>
                <%: Html.ValidationMessageFor(model => model.SelfContactMethod) %>
            </div>
            
            <div class="editor-label">
                备注
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Note) %>
                <%: Html.ValidationMessageFor(model => model.Note) %>
            </div>
            
            <div class="editor-label">
                合同附件
            </div>
            <div class="editor-field">
                <div>
                <%: Html.ActionLink("上传合同附件", "../Pages/Upload/UploadDefault.aspx", new { fk = Model.guid, type = MvcProject.Utils.AttachinfoEnum.TemporaryWorkers.ToString(), subtype = MvcProject.Utils.AttachinfoEnum.Contract.ToString() }, new { target = "_blank" })%>
                <div>
                <table>
                <tr>
                    <th>
                        附件
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <%
                    IEnumerable<MvcProject.Models.AttachInfo> AttachInfos1 = (IEnumerable<MvcProject.Models.AttachInfo>)ViewData["attachinfos_ContractAttachment"];
                    if (AttachInfos1 != null) foreach (var item in AttachInfos1)
                        { %>
                <tr>
                    <td>
                        <%:  Html.ActionLink("浏览", "../AttachInfo/" + item.attachmentPath, new {  }, new { target = "_blank" })%>
                    </td>
                    <td>
                        <%: Html.ActionLink("删除", "../ContractInfo/DeleteAttachInfo", new { id = item.guid,type=1 }, new { target = "_blank" })%>
                    </td>
                </tr>
                <% } %>
            </table>
            </div>
            </div>
            </div>
            
            <div class="editor-label">
                身份证附件
            </div>
            <div class="editor-field">
                <div>
                <%: Html.ActionLink("上传身份证附件", "../Pages/Upload/UploadDefault.aspx", new { fk = Model.guid, type = MvcProject.Utils.AttachinfoEnum.TemporaryWorkers.ToString(), subtype = MvcProject.Utils.AttachinfoEnum.IdCard.ToString() }, new { target = "_blank" })%>
                <div>
                <table>
                <tr>
                    <th>
                        附件
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <%
                    IEnumerable<MvcProject.Models.AttachInfo> AttachInfos2 = (IEnumerable<MvcProject.Models.AttachInfo>)ViewData["attachinfos_IdCardAttachment"];
                    if (AttachInfos2 != null) foreach (var item in AttachInfos2)
                        { %>
                <tr>
                    <td>
                        <%:  Html.ActionLink("浏览", "../AttachInfo/" + item.attachmentPath, new {  }, new { target = "_blank" })%>
                    </td>
                    <td>
                        <%: Html.ActionLink("删除", "../ContractInfo/DeleteAttachInfo", new { id = item.guid,type=1 }, new { target = "_blank" })%>
                    </td>
                </tr>
                <% } %>
            </table>
            </div>
            </div>
            </div>
            
            <div class="editor-label">
                上岗证附件
            </div>
            <div class="editor-field">
                <div>
                <%: Html.ActionLink("上传上岗证附件", "../Pages/Upload/UploadDefault.aspx", new { fk = Model.guid, type = MvcProject.Utils.AttachinfoEnum.TemporaryWorkers.ToString(), subtype = MvcProject.Utils.AttachinfoEnum.EmployeeCard.ToString() }, new { target = "_blank" })%>
                <div>
                <table>
                <tr>
                    <th>
                        附件
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <%
                    IEnumerable<MvcProject.Models.AttachInfo> AttachInfos3 = (IEnumerable<MvcProject.Models.AttachInfo>)ViewData["attachinfos_EmployeeCardAttachment"];
                    if (AttachInfos3 != null) foreach (var item in AttachInfos3)
                        { %>
                <tr>
                    <td>
                        <%:  Html.ActionLink("浏览", "../AttachInfo/" + item.attachmentPath, new {  }, new { target = "_blank" })%>
                    </td>
                    <td>
                        <%: Html.ActionLink("删除", "../ContractInfo/DeleteAttachInfo", new { id = item.guid,type=1 }, new { target = "_blank" })%>
                    </td>
                </tr>
                <% } %>
            </table>
            </div>
            </div>
            </div>
            
            <div class="editor-label">
                工程项目ID
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ProjectId) %>
                <%: Html.ValidationMessageFor(model => model.ProjectId) %>
            </div>
            
            <div class="editor-label">
                项目名称
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.ProjectName) %>
                <%: Html.ValidationMessageFor(model => model.ProjectName) %>
            </div>
            
            <div class="editor-label">
                班组ID
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.TeamId) %>
                <%: Html.ValidationMessageFor(model => model.TeamId) %>
            </div>
            
            <div class="editor-label">
                班组名称
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.TeamName) %>
                <%: Html.ValidationMessageFor(model => model.TeamName) %>
            </div>
            <p>
                <input type="submit" value="保存" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("返回临时工列表", "Index") %>
    </div>

</asp:Content>

